package org.scala.test.fun1

class Girl(val name:String,val id:Int){
  
}
import   MyPredef._ 
object Girl{
 
  
   def main(args: Array[String]): Unit = {
      val g1 = new Girl("lihc",212)
      val g2 = new Girl("yu",33)
      
      println(MyPredef.Girl.compare(g1, g2))
      
      val c = new CompareC[Girl] 
      
     //import   MyPredef._ 
      val g3 = c.choose(g1, g2) 
      println("g3.name: "+g3.name)
      val g31 =  c.select(g1, g2)
      println("g31.name: "+ g31.name)
      
       val g32 =  c.random(g1, g2)
      println("g32.name: "+ g32.name)
      
      val c1 = new ComparLeft[Girl] 
      val g4 = c1.choose(g1,g2)
      println(g4.name)
   }
}